import 'package:cook_dinner/pages/setting/setting_view/setting_view.dart';
import 'package:cook_dinner/widgets/custom_appbar.dart';
import 'package:flutter/material.dart';
import 'package:cook_dinner/config/include.dart';

class Setting extends StatelessWidget {
  const Setting({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: const Color(0xfff9f9f9),
      appBar: AppBarCustom('设置'),
      body: ListView(
        padding: EdgeInsets.only(
          top: 19.rpx,
          left: 17.rpx,
          right: 17.rpx,
          bottom: 28.rpx,
        ),
        children: [
          const SettingView(
            children: [
              SettingItem('账号绑定'),
              SettingItem('修改密码'),
            ],
          ),
          const SettingView(
            children: [
              SettingItem('隐私设置'),
              SettingItem('消息设置'),
            ],
          ),
          const SettingView(
            children: [
              SettingItem('通用设置'),
              SettingItem('字体大小'),
              SettingItem('深色模式'),
            ],
          ),
          const SettingView(
            children: [
              SettingItem('意见反馈'),
              SettingItem('用户协议'),
              SettingItem('隐私政策'),
              SettingItem('更新版本'),
              SettingItem('个人信息收集清单'),
              SettingItem('关于做饭吧'),
            ],
          ),
          InkWell(
            child: Container(
              width: double.infinity,
              height: 50.rpx,
              alignment: Alignment.center,
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(10.rpx),
              ),
              child: Text(
                '退出登录',
                style: TextStyle(
                  color: const Color(0xff333333),
                  fontSize: 18.rpx,
                ),
              ),
            ),
          ),
        ],
      ),
    );
  }
}
